//html,body{
//  height: 100%;
//  margin: 0;
//  overflow: hidden;
//}
@keyframes rotation {
  100% {
    transform: rotate(1turn);
  }
}
@keyframes snow {
  0% {
    transform: translateY(-12rem) rotate(45deg);
  }
  50%,
  100% {
    transform: translateY(12rem) rotate(45deg);
  }
}

@keyframes thunder {
  0%,
  25%,
  75%,
  100% {
    filter: drop-shadow(0px -1px 0px #cfb8e5) drop-shadow(0px 0px 0px #9a4ee7)
      drop-shadow(0px 0px 0px rgba(#9a4ee7, 30%)) drop-shadow(-2px -2px 1px #3c3762)
      drop-shadow(4px 1px 1px #3c3762);
  }
  50% {
    filter: drop-shadow(0px -1px 0px #cfb8e5) drop-shadow(0px 0px 3px #9a4ee7)
      drop-shadow(0px 0px 30px rgba(#9a4ee7, 30%)) drop-shadow(-2px -2px 1px #3c3762)
      drop-shadow(4px 1px 1px #3c3762);
  }
}

@keyframes floating {
  0%,
  100% {
    transform: translatey(0);
  }
  50% {
    transform: translatey(1rem);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.9);
  }
}

@keyframes neon {
  0%,
  40%,
  60%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(0.9);
  }
}

//body{
//display:grid;
//grid-template-columns: repeat(2, 1fr);
//grid-template-rows: repeat(2, 1fr);
//grid-column-gap: 0px;
//grid-row-gap: 0px;
//}
.parent {
  display: flex;
}
.weather {
  align-items: center;
  justify-content: center;
  width: 20rem;
  overflow: hidden;
  &__sun {
    background: linear-gradient(45deg, #628aa4, #77a1b8);
  }
  &__thunder {
    background: linear-gradient(45deg, #172a44, #1f3654);
  }
  &__snow {
    background: linear-gradient(45deg, #5e6270, #82889c);
  }
  &__rainbow {
    background: linear-gradient(45deg, #1d5476, #296b8f);
  }
}
.weather_sun {
  background: linear-gradient(45deg, #628aa4, #77a1b8);
}
.icon {
  position: relative;
  width: 18rem;
  height: 18rem;
  transform: scale(0.8);
  &__rainbow {
    position: absolute;
    top: -2rem;
    right: 0rem;
    width: 14rem;
    height: 14rem;
    filter: drop-shadow(0px 0px 10px rgba(255, 255, 255, 0.2));
    animation: pulse 4s infinite;
    &__arc {
      position: absolute;
      color: red;
      border-radius: 50%;
      box-shadow: inset 2.5rem 2rem 0.3rem -3rem #000000bf, inset 0 0 0.3rem 0.25rem #ffffffb8,
        inset 0 0 0.2rem 0.4rem #000000a6, inset 0 0 0 0.6rem;
      animation: neon 4s infinite;
      inset: 0;
      &:nth-child(1) {
        color: #ff1f5d;
      }
      &:nth-child(2) {
        color: #eb8125;
        animation-delay: 0.2s;
        inset: 0.9rem;
      }
      &:nth-child(3) {
        color: #fbff0e;
        animation-delay: 0.4s;
        inset: 1.8rem;
      }
      &:nth-child(4) {
        color: #a8ef3c;
        animation-delay: 0.6s;
        inset: 2.7rem;
      }
      &:nth-child(5) {
        color: #59d9ff;
        animation-delay: 0.8s;
        inset: 3.6rem;
      }
      &:nth-child(6) {
        color: #6685f5;
        animation-delay: 1s;
        inset: 4.5rem;
      }
      &:nth-child(7) {
        color: #6a38e1;
        animation-delay: 1.2s;
        inset: 5.4rem;
      }
    }
  }
  &__snow {
    position: absolute;
    top: 12.8rem;
    left: 0;
    width: 100%;
    height: 10rem;
    overflow: hidden;
    &_flakes {
      position: absolute;
      top: 0;
      left: 13rem;
      width: 0.8rem;
      height: 0.8rem;
      color: #fff;
      background: #fff;
      box-shadow: 1rem 2rem, 1rem 7rem, 4rem 8rem, -5rem 8rem, -2rem 4rem, 0rem 11rem, 4rem 5rem,
        -2rem 8rem, 4rem 3rem 0 -0.1rem, 0rem 5rem 0 -0.1rem, -4rem 5rem 0 -0.1rem,
        -2rem 10rem 0 -0.1rem, -1rem 3rem 0 -0.2rem, 2rem 5rem 0 -0.2rem, -2rem 11rem 0 -0.2rem,
        2rem 9rem 0 -0.2rem, -4rem 3rem 0 -0.2rem;
      transform: translateY(-12rem) rotate(45deg);
      opacity: 0.5;
      animation: snow 3s linear infinite;
    }
  }
  &__rain {
    position: absolute;
    top: 12.8rem;
    left: 0;
    width: 100%;
    height: 10rem;
    overflow: hidden;
    &_drops {
      position: absolute;
      top: 0;
      left: 13rem;
      width: 0.6rem;
      height: 0.6rem;
      color: #7a98e9;
      background: #7a98e9;
      border-radius: 0 1rem 1rem;
      box-shadow: 1rem 2rem, 1rem 7rem, 4rem 8rem, -5rem 8rem, -2rem 4rem, 0rem 11rem, 4rem 5rem,
        -2rem 8rem, 4rem 3rem 0 -0.1rem, 0rem 5rem 0 -0.1rem, -4rem 5rem 0 -0.1rem,
        -2rem 10rem 0 -0.1rem, -1rem 3rem 0 -0.2rem, 2rem 5rem 0 -0.2rem, -2rem 11rem 0 -0.2rem,
        2rem 9rem 0 -0.2rem, -4rem 3rem 0 -0.2rem;
      transform: translateY(-12rem) rotate(45deg);
      opacity: 1;
      animation: snow 3s linear infinite;
      animation-delay: 1s;
    }
  }
  &__sun {
    position: absolute;
    top: 1rem;
    right: 3.5rem;
    width: 5rem;
    height: 5rem;
    background: linear-gradient(45deg, #f09559 40%, #f0ca43);
    border-radius: 50%;
    filter: drop-shadow(0 0 10px rgba(#efda90, 0.4)) drop-shadow(0 0 30px rgba(#f0ca43, 0.4));
    &_lights {
      position: absolute;
      animation: rotation 6s linear infinite;
      inset: 0;
    }
    &_light {
      position: absolute;
      top: -2.75rem;
      left: 50%;
      width: 0.9rem;
      height: 2.5rem;
      margin-left: -0.45rem;
      background: linear-gradient(45deg, #f0b343, #f0ca43);
      border-radius: 1rem;

      transform-origin: 50% 5.25rem;
      &:nth-child(2) {
        transform: rotate(1 * 45deg);
      }
      &:nth-child(3) {
        transform: rotate(2 * 45deg);
      }
      &:nth-child(4) {
        transform: rotate(3 * 45deg);
      }
      &:nth-child(5) {
        transform: rotate(4 * 45deg);
      }
      &:nth-child(6) {
        transform: rotate(5 * 45deg);
      }
      &:nth-child(7) {
        transform: rotate(6 * 45deg);
      }
      &:nth-child(8) {
        transform: rotate(7 * 45deg);
      }
      &:nth-child(9) {
        transform: rotate(8 * 45deg);
      }
      //@for $c from 2 to 9 {
      //  &:nth-child(#{$c}){
      //    transform:rotate(($c - 1)* 360deg/8);
      //  }
      //}
    }
  }
  &__thunder {
    position: absolute;
    top: 10rem;
    left: 50%;
    width: 4.8rem;
    height: 8.6rem;
    margin-left: -2.4rem;
    filter: drop-shadow(0px -1px 0px #cfb8e5) drop-shadow(0px 0px 0px #9a4ee7)
      drop-shadow(-2px -2px 1px #3c3762) drop-shadow(4px 1px 1px #3c3762);
    animation: thunder 3s infinite, floating 3s infinite;
    &:before,
    &:after {
      position: absolute;
      top: 0;
      left: 0;
      width: 3rem;
      height: 5rem;
      background: #645d95;
      border-radius: 0.4rem;
      box-shadow: inset -0.2rem -0.4rem 0.2rem #3c3762, inset -0.1rem -0.1rem 0.4rem #fff;
      content: '';
      clip-path: polygon(100% 100%, 0% 100%, 100% 0);
    }
    &:after {
      top: auto;
      right: 0;
      bottom: 0;
      left: auto;
      box-shadow: inset 0.2rem 0.3rem 0.2rem #3c3762, inset 0.1rem 0.2rem 0.4rem #fff;
      clip-path: polygon(0% 100%, 100% 0%, 45% 0%, 0% 26%);
    }
  }
  &__cloud {
    position: absolute;
    top: 1rem;
    left: 0;
    width: 18rem;
    height: 12rem;
    background: rgb(255 255 255 / 45%);
    box-shadow: inset 0rem -1.3rem 0.25rem -1rem #fff, inset 0rem 0rem 5rem 0rem #ffffff4d;
    opacity: 1;
    backdrop-filter: blur(8px);
    clip-path: url(#cloud-path);
    .weather__snow & {
      background: rgb(100 130 197 / 45%);
    }
    .weather__thunder & {
      background: rgb(116 116 116 / 45%);
    }
    .weather__rainbow & {
      background: #4a6676;
    }
    &_reflect {
      width: 11.9rem;
      height: 12rem;
      border-radius: 50%;
      box-shadow: inset 0rem -1.1rem 0.25rem -1rem #fff, inset 0.45rem 0rem 0.25rem -0.25rem #fff,
        inset -0.45rem 0.5rem 0.25rem -0.45em #fff,
        inset 0.25rem 0.25rem 0.5rem 0rem rgb(0 0 0 / 30%);
      clip-path: polygon(0 0, 100% 0%, 100% 33%, 50% 30%, 50% 100%, 0% 100%);

      &__2 {
        position: absolute;
        right: 0.5rem;
        bottom: 0.1rem;
        width: 8.7rem;
        height: 8.7rem;
        clip-path: polygon(0 0, 100% 0%, 100% 100%, 50% 100%, 29% 0%);
      }
    }
    &_shadow {
      position: absolute;
      top: -30rem;
      left: 30rem;
      z-index: -1;
      width: 18rem;
      height: 9rem;
      border-radius: 50%;
      box-shadow: -36rem 38rem 7rem #00000054;
    }
    &_svg {
      clipPath {
        transform: scale(0.65);
      }
    }
  }
}
